export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.directive("logo-error", {
    mounted(el) {
      if (el.src) {
        el.onerror = () => {
          el.src = new URL(
            "../assets/images/user-logo/default_logo.jpg",
            import.meta.url
          );
        };
      } else {
        el.src = new URL(
          "../assets/images/user-logo/default_logo.jpg",
          import.meta.url
        );
      }
    },
  });
});
